<?php
class AllAction extends Action{
    function _initialize(){
		

		
		
		$s = M('sysconfig')->order('id asc')->select();
		foreach ($s as $v) {
			$C[$v['varname']] = $v['value'];
		}
		if($C['webstatus']=='0'){$this->redirect('Public/close');}
		$this->assign('C', $C);

		 //首页顶部广告位
		 $shouyedingbuguanggaowei = M('guanggaowei')->find(1);
		 $this->assign('shouyedingbuguanggaowei',$shouyedingbuguanggaowei);

		//宠物
		if($_SESSION['user_id']){
			$chongwu=M('user')->find($_SESSION['user_id']);
			if($chongwu['daren']!=0){
				$chongwu['chongwu']="./Public/Share/img/chongwu1.gif";	
			}else{
				$chongwu['chongwu']="";
			}	
		}else{
			$chongwu['chongwu']="";
		}
		$this->assign($chongwu);
            
	}
}
?>